package MethodApplication.MethodDemo3;

public class son extends father{
    public void hi(){
        System.out.println("我是子类hi");
    }
    public static void method3(Method3 m){
        m.print();
    }
    public void show(){
        /*method3(()->{
            father father = new father();
            father.Sayhello();
        });*/
        //优化
        /*method3(()->{
            super.Sayhello();
        });*/
        //通过Super的方法引用
        method3(super::Sayhello);
    }

    public static void main(String[] args) {
        new son().show();
    }
}
